package v1beta2

import (
	"unsafe"

	"cke.io/ckectl/app/apis"
	"k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
)

func Convert_Ansible_Configuration_To_v1beta2_Configuration(in *apis.AnsibleManger) (out *AnsibleManger) {
	return (*AnsibleManger)(unsafe.Pointer(in))
}

func Convert_v1beta2_Configuration_To_Ansible_Configuration(in *AnsibleManger) (out *apis.AnsibleManger) {
	return (*apis.AnsibleManger)(unsafe.Pointer(in))
}

func LoadOrDefaultCkeConfiguration(configuration *kubeadm.InitConfiguration, ckeConfiguration *CkeConfiguration) apis.CkeConfiguration {
	return apis.CkeConfiguration {
		InitConfiguration: *configuration,
		Ansible:           *Convert_v1beta2_Configuration_To_Ansible_Configuration(&ckeConfiguration.Ansible),
		InsecureRegistry:  ckeConfiguration.InsecureRegistry,
	}
}